import request from '@/utils/request'

//查询认证列表
export function authenticationList(params) {
  return request({
    url:'/api/authentication/list',
    method:'get',
    params:params
  })
}

//根据Id查询认证
export function getAuth(authId) {
  return request({
    url:'/api/authentication/queryAuth/'+authId,
    method:'get'
  })
}

//修改认证
export function updateAuth(data) {
  return request({
    url:'/api/authentication/updateAuthentication',
    method:'post',
    data:data
  })
}

//查询配送员是否存在
export function whetherExistStaff(authId) {
  return request({
    url:'/api/authentication/staffByAuthId/'+authId,
    method:'get',
  })
}

//通过认证
export function certified(data) {
  return request({
    url:'/api/authentication/adopt',
    method:'post',
    data:data
  })
}
//修改状态
export function updateState(authId) {
  return request({
    url:'/api/authentication/updateState/'+authId,
    method:'get'
  })
}

//删除认证
export function delAuth(authenticationId) {
  return request({
    url:'/api/authentication/'+authenticationId,
    method: 'delete'
  })
}

//批量删除
export function delAuths(authenticationIds) {
  return request({
    url:'/api/authentication/deleteAuthenticationBatch/'+authenticationIds,
    method:'delete',
  })
}


